<template>
	<view class="">
		<zhCustomTabs :tabs_list="list" :list="list" :current.sync="current" @click="clickTabs">
			<template #listItem="{ row,index }">
				<view class="goods">支持自定义内容{{ index }}</view>
			</template>
		</zhCustomTabs>
	</view>
</template>

<script>
	import zhCustomTabs from '@/components/zh-custom-tabs/zh-custom-tabs/zh-custom-tabs.vue';
	export default {
		components: {
			zhCustomTabs
		},
		data() {
			return {
				list: [{
						id: 1,
						name: '苹果'
					},
					{
						id: 2,
						name: '香蕉'
					},
					{
						id: 3,
						name: '西瓜'
					},
					{
						id: 4,
						name: '菠萝'
					},
					{
						id: 5,
						name: '石榴'
					},
					{
						id: 6,
						name: '榴莲'
					},
					{
						id: 7,
						name: '香橙'
					},
					{
						id: 8,
						name: '黄桃'
					}
				],
				current: 0
			};
		},
		methods: {
			clickTabs(e) {
				console.log(e);
			}
		},
	};
</script>

<style lang="scss" scoped>
	.goods {
		height: 300rpx;
		background-color: rgba(60, 156, 255, 0.1);
		margin-bottom: 40rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 30rpx;
	}
</style>